package com.yxy.dao;


import com.yxy.entity.SportDynamic;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;


/**
 *
 * SportDynamicDao
 *
 * @version
 * <pre>
 * Author	Version		Date		Changes
 * 邓文俊 	1.0  	2018-01-11 16:43:07	 	Created
 *
 * </pre>
 * @since 1.
 */
@Repository
public interface SportDynamicDao {
    /**
     * 单个新增
     *
     * @param entity
     * @return
     */
    int insert(SportDynamic entity);

    /**
     * 单个更新
     *
     * @param entity
     * @return
     */
    int updateByPrimaryKey(SportDynamic entity);

    /**
     * 单个删除
     *
     * @param entity
     * @return
     */
    int deleteByPrimaryKey(SportDynamic entity);



    /**
     * 查询列表
     *
     * @param entity
     * @return
     */
    List<SportDynamic> selectAll(SportDynamic entity);

    /**
     * 根据id查询
     *
     * @param entity
     * @return
     */
    SportDynamic select(SportDynamic entity);


    /**
     * 批量新增
     *
     * @param list
     * @return
     */
    int insertBatch(List<SportDynamic> list);

    /**
     * 批量删除
     *
     * @param list
     * @return
     */
    int deleteBatch(List<SportDynamic> list);


    int insertSportDynamicLikeRelationship(@Param("userId")Integer userId, @Param("sportDynamicId") Integer sportDynamicId);

    int deleteSportDynamicLikeRelationship(@Param("userId")Integer userId, @Param("sportDynamicId") Integer sportDynamicId);

    int selectSportDynamicLikeRelationship(@Param("userId")Integer userId, @Param("sportDynamicId") Integer sportDynamicId);
}